let brain = require("brain.js");
let json = require("./model.json");
let data = require("../res/res.json");

let network = new brain.NeuralNetwork();
network.fromJSON(json);

const output = network.run([
  3, 3, 15, 5, 2, 7, 3, 2, 7, 22, 5, 4, 21, 22, 15, 2, 2, 6, 1, 7, 1, 1, 5, 10,
  5, 24, 2, 1, 19, 11, 3, 1, 13, 5, 4,
]);
console.log(
  "红球结果--->",
  output.map((x) => Math.round(x * 35)).sort((a, b) => a - b)
);
// console.log(
//   "红球结果--->",
//   output.map((x) => Math.floor(x * 35) + 1).sort((a, b) => a - b)
// );

// for (let item in data) {
//   let o = item - 0 + 1;
//   if (data[o] && item >= 2024141 && item <= 2024151) {
//     // if (data[o] && item >= 2024110) {
//     const output = network.run(data[item].wzjred);
//     console.log(
//       item + "预测红球结果--->",
//       output.map((x) => Math.round(x * 35)).sort((a, b) => a - b),
//       "真实结果--->",
//       data[o].red
//     );
//   }
// }
